﻿<%@ Page Title="" Language="C#" MasterPageFile="~/QTMusic.Master" AutoEventWireup="true" CodeBehind="SearchResult.aspx.cs" Inherits="QTMusic.Websites.SearchResult" %>

<%@ Register Src="../UserControls/RightPageOfHome.ascx" TagName="RightPageHome" TagPrefix="rph" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class="main_content_hdr">
        <div><b>Kết quả tìm kiếm</b></div>
        <div style="font-size: 12px;">
            <asp:Label ID="lblResult" runat="server"></asp:Label>
        </div>
    </div>

    <div class="main_content_holder">
     <asp:Label ID="Label1" runat="server"></asp:Label>
   <h3>Kết quả tìm kiếm cho bài hát</h3>
      <asp:Label ID="lblSong" runat="Server"></asp:Label>
      <asp:GridView ID="songGrid" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#FFFFFF" BorderStyle="None" BorderWidth="0" CellPadding="8" AllowPaging="true" PageIndex="0" PageSize="3" OnPageIndexChanging="songGrid_PageIndexChanging"
            PagerSettings-PreviousPageText="previous" PagerSettings-FirstPageText="first" PagerSettings-NextPageText="next" PagerSettings-LastPageText="last"
            PagerSettings-Mode="NumericFirstLast">
            <Columns>
                <%--<asp:HyperLinkField HeaderText="Bài hát" ItemStyle-Font-Bold="true" DataNavigateUrlFields="_id"  
                    DataNavigateUrlFormatString="/Websites/Playing.aspx?SongID={0}"  
                    DataTextField="_name"  
                    />     
                <asp:BoundField DataField="_length" HeaderText="" ItemStyle-Font-Size="Small" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="_downloadCount" HeaderText="Lượng download" ItemStyle-HorizontalAlign="Center"/>--%>
                <asp:TemplateField>
                    <ItemTemplate>
                        <!-- song entry -->
                        <div class="main_content_songentry">
                            <div class="main_content_songentry_leftimg"> 
                                <img src="../Resources/WebImages/file mp3.png" alt="../Resources/WebImages/file mp3.png" width="72px" height="72px" /> 
                            </div>
                            <div class="main_content_songentry_midinfo">
                                <div style="font-size: 18px; font-weight:bold">
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/Websites/Playing.aspx?SongID=" + Eval("_id") %>'>
                                        <%# Eval("_name")%>
                                    </asp:HyperLink>
                                </div>
                                <div style="font-size: 12px;">Trình bày: <%# Eval("_artist")%> - Thể loại: <%# Eval("_genre")%> </div>
                                <br />
                            </div>
                            <div class="main_content_songentry_statistic">
                                 <img src="../Resources/WebImages/listen.jpg" width="10px" height="10px"> <%# Eval("_playCount").ToString() %> - 
                                    <img src="../Resources/WebImages/like.jpg" width="10px" height="10px"> <%# Eval("_likeCount").ToString() %> - 
                                    <img src="../Resources/WebImages/comment.jpg" width="10px" height="10px"> <%# Eval("_downloadCount").ToString() %>
                            </div>
                        </div> 
                                                            
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
     </asp:GridView>
 
     <hr />
     <h3>Kết quả tìm kiếm cho album</h3>
     <asp:GridView ID="albumGrid" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#FFFFFF" BorderStyle="None" BorderWidth="1px" CellPadding="8" AllowPaging="true" PageIndex="0" PageSize="3" OnPageIndexChanging="albumGrid_PageIndexChanging"
            PagerSettings-PreviousPageText="previous" PagerSettings-FirstPageText="first" PagerSettings-NextPageText="next" PagerSettings-LastPageText="last"
            PagerSettings-Mode="NumericFirstLast">
            <Columns>
                <asp:HyperLinkField HeaderText="Album" ItemStyle-Font-Bold="true" DataNavigateUrlFields="_id"  
                    DataNavigateUrlFormatString="/Websites/Playing.aspx?SongID={0}"  
                    DataTextField="_name"  
                    />
                <asp:BoundField DataField="_playCount" HeaderText="Lượng nghe" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="_releaseDate" HeaderText="Ngày phát hành" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}"/>
            </Columns>
     </asp:GridView>
     <hr />
     <h3>Kết quả tìm kiếm cho playlist</h3>
     <asp:GridView ID="playlGrid" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#FFFFFF" BorderStyle="None" BorderWidth="1px" CellPadding="8" AllowPaging="true" PageIndex="0" PageSize="3" OnPageIndexChanging="playlGrid_PageIndexChanging"
            PagerSettings-PreviousPageText="previous" PagerSettings-FirstPageText="first" PagerSettings-NextPageText="next" PagerSettings-LastPageText="last"
            PagerSettings-Mode="NumericFirstLast">
            <Columns>
                <asp:HyperLinkField HeaderText="Playlist" ItemStyle-Font-Bold="true" DataNavigateUrlFields="_id"  
                    DataNavigateUrlFormatString="/Websites/Playing.aspx?SongID={0}"  
                    DataTextField="_name"  
                    />
                <asp:BoundField DataField="_playCount" HeaderText="Lượng nghe" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="_releaseDate" HeaderText="Ngày tạo" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}"/>
            </Columns>
     </asp:GridView>
     <hr />
     <h3>Kết quả tìm kiếm cho nghệ sỹ</h3>
     <asp:GridView ID="artistGrid" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#FFFFFF" BorderStyle="None" BorderWidth="1px" CellPadding="8" AllowPaging="true" PageIndex="0" PageSize="3" OnPageIndexChanging="artistGrid_PageIndexChanging"
            PagerSettings-PreviousPageText="previous" PagerSettings-FirstPageText="first" PagerSettings-NextPageText="next" PagerSettings-LastPageText="last"
            PagerSettings-Mode="NumericFirstLast">
            <Columns>
                <asp:HyperLinkField HeaderText="Nghệ sỹ" ItemStyle-Font-Bold="true" DataNavigateUrlFields="_id"  
                    DataNavigateUrlFormatString="/Websites/Playing.aspx?SongID={0}"  
                    DataTextField="_name"  
                    />
                <asp:BoundField DataField="_debutYear" HeaderText="Năm ra mắt" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}"/>
            </Columns>
     </asp:GridView>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
     <rph:RightPageHome runat="server" />
</asp:Content>
